package il.ac.tau.cg.ex3.math.intersectors;

import il.ac.tau.cg.ex3.entities.surfaces.Surface;
import il.ac.tau.cg.ex3.math.Point;
import il.ac.tau.cg.ex3.math.Vector;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

public class SimpleIntersector extends Intersector
{
	private List<Surface> surfaces;
	
	public SimpleIntersector(Collection<? extends Surface> surfaces)
	{
		this.surfaces = new ArrayList<Surface>(surfaces);
	}
	
	@Override
	public IntersectionResult intersect(Point origin, Vector direction)
	{
		return intersectCollection(origin, direction, surfaces);
	}
}
